<?php 
/**
 * @author Eugenio Fage
 * http://eugeniofage.wordpress.com/
 * http://code.google.com/p/monky/
 * 
 */
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php echo $this->Html->charset(); ?>
  <title><?php echo $title_for_layout; ?></title>
  
    <!-- Framework CSS -->
    <?php 
    echo $this->Html->css('blueprint/screen.css', null, array('media' => 'screen, projection')).
    	$this->Html->css('blueprint/print.css', null, array('media' => 'print'));
    ?>
	<!--[if lt IE 8]><?=$this->Html->css('blueprint/ie.css', null, array('media' => 'screen, projection')); ?><![endif]-->

  <?php
	echo $this->Html->meta('icon').
		$this->Html->css(array('style2')),
		$this->Html->script(array('jquery-1.4.2.min.js','jquery.blockUI.js','jquery.scrollTo.js'
			,'jquery.simplemodal.1.4.min.js'));
	echo $scripts_for_layout;
	
  ?>
</head>
<body>

  <div class="container">
    <div id="header">
      <h1><?php echo $this->Html->link('MONKY', '/',array('escape'=>false)); ?></h1>
      <div id="link-header">
      <?
      if($this->Session->check('Auth.User.id')){
          echo $this->Html->link(__('profile',true),array('controller'=>'users','action'=>'profile'));
          echo $this->Html->link(__('logout',true),array('controller'=>'users','action'=>'logout'));
        }else {
		  echo $this->Html->link(__('register',true),array('controller'=>'users','action'=>'register'));
          echo $this->Html->link(__('login',true),array('controller'=>'users','action'=>'login'));
        }
        echo $this->Html->link(__('help',true),array('controller'=>'pages','action'=>'display','help'));
        echo $this->Form->create('Link',array('action'=>'search','id'=>'search-form','type'=>'get'));
        echo $this->Form->input('Search.text',array('id'=>'top-keywords','label'=>false,'div'=>false));
        echo $this->Form->submit(' ',array('id'=>'top-submit','type'=>'submit','label'=>false,'div'=>false));
        echo $this->Form->end();
      ?>
      </div>
      <ul class="topnav">
        <li><?=$this->Html->link(__('Submit news',true),array('controller'=>'links','action'=>'add')) ?></li>
        <li><?=$this->Html->link(__('Cover',true),array('controller'=>'links','action'=>'index')) ?></li>
        <li><?=$this->Html->link(__('Popular',true),array('controller'=>'links','action'=>'popular')) ?></li>
        <li><?=$this->Html->link(__('Pending',true),array('controller'=>'links','action'=>'shakeit')) ?></li>
        <li><?=$this->Html->link(__('Sneak',true),array('controller'=>'logs','action'=>'index')) ?></li>
        <? // </li>$this->Html->link(__('Monky notes',true),array('controller'=>'links','action'=>'index')) </li> ?>
        <li class="leftTopnav"><a href="#footer">Code its poetry</a></li>
        <?php if($this->Session->check('Auth.User.id')){ ?>
        <li class="leftTopnav"><?=$this->Html->link(sprintf(__('hi %s',true),$this->Session->read('Auth.User.username')),array('controller'=>'users','action'=>'view',$this->Session->read('Auth.User.id')))?></li>
        <?php } ?>
      </ul>
      <div style="clear:both"></div>			
    </div>
    <div id="content">
      <?php echo $this->Session->flash('email'); ?>
      <?php echo $this->Session->flash(); ?>
      <?php echo $content_for_layout; ?>
      <div style="clear:both"></div>
    </div>
    <div id="footer">
    	<b>Proudly created by Eugenio</b> | <a href="http://code.google.com/p/monky/source/checkout">Source of code</a>
    </div>
    <hr class="space" />
  </div>
  <?php
  if(isset($this->Js)) echo $this->Js->writeBuffer();
  echo $this->element('sql_dump'); ?>
</body>
</html>